<!DOCTYPE html>
<html lang="en">
<head>
  <title>浩然金融中心管理平台</title>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"
        name="viewport">
  <#include "/common/apicsslib.html">
  <script type="text/javascript">
      var apiFacadeDocTable;
  </script>
</head>
<body>
<div class="open-wrapper">
  <div class="page-wrapper">
    <header class="header" id="header">
      <div class="container">
        <a class="logo" href="https://open.alipay.com/">
          <img alt="logo" src="/resources/10.16.72.32/apicss/image/hsjry.svg">
        </a>
        <ul class="main-menu">
          <li class="has-submenu">
            <a href="https://docs.open.alipay.com/#">商业合作 </a>
            <ul class="sub-menu">
              <li>
                <a href="https://open.alipay.com/paymentServicer/paymentServicer.htm">支付服务商</a>
              </li>
              <li>
                <a href="https://openhome.alipay.com/platform/banner.htm">行业解决方案</a>
              </li>
              <li>
                <a href="http://docs.open.alipay.com/300">合作攻略</a>
              </li>
            </ul>
          </li>
          <li>
            <a href="https://open.alipay.com/developmentAccess/developmentAccess.htm">开发接入</a>
          </li>
          <li class="has-submenu active">
            <a href="https://docs.open.alipay.com/#">文档中心 </a>
            <ul class="sub-menu">
              <li><a href="https://docs.open.alipay.com/catalog">开发文档</a></li>
              <li><a href="http://docs.open.alipay.com/api">API 文档</a></li>
              <li><a href="https://open.alipay.com/productDocument.htm">业务文档</a></li>
              <li><a href="http://docs.open.alipay.com/rules">规则中心</a></li>
            </ul>
          </li>
          <li>
            <a href="https://openevent.alipay.com/anttalk/web.htm">蚂蚁开放日</a>
          </li>
          <li>
            <a href="https://myfw.alipay.com/commodity/v2/ant/merchandise/index.htm">服务市场</a>
          </li>
        </ul>
        <ul class="user-menu">
          <li class="header-search">
            <form accept-charset="utf-8" action="https://open.alipay.com/search/searchDetail.htm?tabType=doc"
                  class="search-form"
                  id="search-form" method="GET" target="_blank">
              <a class="btn-search" href="https://docs.open.alipay.com/#">
                <img alt="search" src="/css/apicss/image/search.png">
              </a>
              <input autocomplete="off" name="keyword" placeholder="输入关键词搜索" type="text" value="">
            </form>
          </li>
          <li class="has-submenu menu-support">
            <a href="https://docs.open.alipay.com/#">帮助支持</a>
            <ul class="sub-menu" style="width: 159px;">
              <li>
                <a href="https://opensupport.alipay.com/support/home.htm">技术支持中心</a>
              </li>
              <li>
                <a href="https://cschannel.alipay.com/newPortal.htm?scene=mysjbzzx">在线咨询</a>
              </li>
              <li>
                <a href="https://open.alipay.com/isv/stuffTemplateDownload.htm?type=basicDomesticPayment">物料模板下载</a>
              </li>
              <li>
                <div class="hotline">
                  <h6>客服电话</h6>
                  <p>0571-88158090</p>
                  <p style="line-height: 1;font-size: 12px;">服务时间：9:00-22:00</p>
                </div>
              </li>
            </ul>
          </li>
          <li class="has-submenu menu-login">
            <a class="btn-login" href="/login/to-login">登录</a>
            <div class="logged-wrapper">
              <span class="avatar"></span>
              <div class="sub-menu">
                <div class="user-profile">
                  <div class="user-profile-account">
                    <p class="user-profile-name"></p>
                    <p class="user-profile-id"></p>
                  </div>
                  <div class="user-profile-outlogin">
                    <a class="account-link" href="https://open.alipay.com/platform/accountSetting.htm" target="_blank">账号管理</a>
                    <a class="logout-link"
                       href="https://auth.alipay.com/login/logout.htm?goto=https://docs.open.alipay.com/api">退出</a>
                  </div>
                </div>
              </div>
            </div>
          </li>
          <li class="header-manager">
            <a href="https://open.alipay.com/platform/manageHome.htm">管理中心</a>
          </li>
          <li class="header-settled visible">
            <a class="btn-settled" href="https://open.alipay.com/platform/homeRoleSelection.htm">免费入驻</a>
          </li>
        </ul>
      </div>
    </header>
    <div class="search-wrapper" id="banner-search">
      <div class="container">
        <div class="main-page-title" style="display:none;">开发文档</div>
        <div class="search-wrapper-inner">
          <input name="tabType" type="hidden" value="api">
          <input autocomplete="off" class="search-input" name="keyword" placeholder="输入关键词搜索" type="text" value="">
          <button class="btn-search" onclick="ApiFacadeDocManager.search()" type="button">搜索</button>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="wrapper api-list">
  <div class="container">
    <div class="main-wrapper">
      <div class="sidebar-wrapper">
        <div class="sidebar" id="sidebar" style="height: 613px;">
          <ul class="menu-group" id="menuList">

          </ul>
        </div>
      </div>
      <div class="main-container">
        <div class="markdown">
          <h1><label id="projectInfo"></label>接口API</h1>
          <table>
            <thead>
            <tr>
              <th>API列表</th>
              <th>描述</th>
              <th>操作</th>
            </tr>
            </thead>
            <tbody id="apiList">

            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
</div>
<div id="footer" style="position: relative">
  <div class="body-footer" id="footer-full">
    <div>
      <style>
        .footer-box-content * {
          box-sizing: border-box;
          -webkit-box-sizing: border-box;
        }

        .site-footer {
          background-color: #232940 !important;
        }

        .footer-box {
          width: 100%;
          background-color: #232940;
        }

        .footer-box-content {
          width: 1240px;
          margin: 0 auto;
          padding: 50px 0px 30px;
        }

        .footer-box-left {
          float: left;
          width: 1020px;
        }

        .footer-box-content-li {
          float: left;
          width: 25%;
          padding-right: 10px;
          -moz-box-sizing: border-box;
          box-sizing: border-box;
        }

        .footer-box-content ul li:last-child {
          margin-right: 0px;
        }

        .footer-box-content-item {
          width: 208px;
        }

        .footer-box-content-name {
          font-size: 22px;
          color: #FFFFFF;
          padding-bottom: 20px;
        }

        .footer-box-content-subli {
          padding-top: 14px;
          white-space: normal;
          word-break: break-all;
          overflow: hidden;
        }

        .footer-box-content-subli a, .footer-box-content-subli span {
          font-size: 16px;
          color: #FFFFFF;
          opacity: 0.6;
          text-decoration: none;
        }

        .footer-box-content-subli a:hover {
          color: #108ee9;
        }

        .footer-box-right {
          float: right;
          width: 220px;
          padding-left: 80px;
          border-left: 1px solid rgba(151, 151, 151, 0.4);
        }

        .footer-box-right-title {
          padding-bottom: 16px;
          font-size: 22px;
          color: #FFFFFF;
        }

        .footer-box-right-item {
          padding-top: 12px;
          font-size: 14px;
          color: #FFFFFF;
        }

        .footer-box-right-item.footer-box-right-item-opacity {
          opacity: 0.6;
        }

        .footer-box-right-item img {
          width: 97px;
          height: 97px;
        }

        .body-footer {
          clear: both;
        }

        .site-footer {
          padding: 16px 0 0;
          font-size: 12px;
          clear: both;
          box-sizing: border-box;
          -webkit-box-sizing: border-box;
        }

        .site-footer .copyright {
          text-align: center;
          opacity: 0.8
        }

        .site-footer.complete .site-footer-links {
          display: block;
          padding-bottom: 2px;
          box-sizing: border-box;
          -webkit-box-sizing: border-box;
        }

        .site-footer-links {
          display: none;
          text-align: center;
        }

        .site-footer-links li {
          display: inline-block;
        }

        .site-footer-links a {
          padding: 0 4px;
          color: #FFFFFF;
          opacity: .8;
          text-decoration: none;
          box-sizing: border-box;
          -webkit-box-sizing: border-box;
        }

        .site-footer-links a:hover {
          color: #108ee9;
        }

        .site-footer-links li:after {
          content: '｜';
          display: inline;
          color: #ffffff;
        }

        .site-footer-links li:last-child:after {
          display: none;
        }

        .isHome, .complete {
          box-shadow: none;
        }

        .isHome .copyright, .complete .copyright {
          color: #FFFFFF;
        }

        .isHome .server, .complete .server {
          color: #232940;
        }
      </style>
      <div class="footer-box">
        <div class="footer-box-content clearfix">
          <div class="footer-box-left">
            <ul class="footer-box-content-ul clearfix">
              <li class="footer-box-content-li">
                <div class="footer-box-content-item">
                  <div class="footer-box-content-name">新手入门</div>
                  <div class="footer-box-content-subitem">
                    <ul>
                      <li class="footer-box-content-subli">
                        <a class="“footer-box-content-item-link”" href="https://docs.open.alipay.com/300/106138"
                           rel="noopener noreferrer"
                           seed="SEED_FOOTER_INFO_ITEM_LINK_1"
                           target="_blank">新手指南</a>
                      </li>
                      <li class="footer-box-content-subli">
                        <a class="“footer-box-content-item-link”"
                           href="https://tech.open.alipay.com/support/knowledge/index.htm?categoryId=20068"
                           rel="noopener noreferrer"
                           seed="SEED_FOOTER_INFO_ITEM_LINK_2"
                           target="_blank">热门FAQ</a>
                      </li>
                      <li class="footer-box-content-subli">
                        <a class="“footer-box-content-item-link”" href="https://docs.open.alipay.com/300"
                           rel="noopener noreferrer"
                           seed="SEED_FOOTER_INFO_ITEM_LINK_3" target="_blank">合作攻略</a>
                      </li>
                      <li class="footer-box-content-subli">
                        <a class="“footer-box-content-item-link”" href="https://docs.open.alipay.com/rules"
                           rel="noopener noreferrer"
                           seed="SEED_FOOTER_INFO_ITEM_LINK_4" target="_blank">平台规则</a>
                      </li>
                    </ul>
                  </div>
                </div>
              </li>
              <li class="footer-box-content-li">
                <div class="footer-box-content-item">
                  <div class="footer-box-content-name">服务支持</div>
                  <div class="footer-box-content-subitem">
                    <ul>
                      <li class="footer-box-content-subli">
                        <a class="“footer-box-content-item-link”" href="https://open.alipay.com/developmentDocument.htm"
                           rel="noopener noreferrer"
                           seed="SEED_FOOTER_INFO_ITEM_LINK_1"
                           target="_blank">开发文档</a>
                      </li>
                      <li class="footer-box-content-subli">
                        <a class="“footer-box-content-item-link”" href="https://open.alipay.com/productDocument.htm"
                           rel="noopener noreferrer"
                           seed="SEED_FOOTER_INFO_ITEM_LINK_2" target="_blank">业务文档</a>
                      </li>
                      <li class="footer-box-content-subli">
                        <a class="“footer-box-content-item-link”"
                           href="https://open.alipay.com/isv/stuffTemplateDownload.htm?type=basicDomesticPayment"
                           rel="noopener noreferrer"
                           seed="SEED_FOOTER_INFO_ITEM_LINK_3"
                           target="_blank">物料模板下载</a>
                      </li>
                      <li class="footer-box-content-subli">
                        <a class="“footer-box-content-item-link”" href="https://openevent.alipay.com/anttalk/web.htm"
                           rel="noopener noreferrer"
                           seed="SEED_FOOTER_INFO_ITEM_LINK_4" target="_blank">蚂蚁开放日</a>
                      </li>
                    </ul>
                  </div>
                </div>
              </li>
              <li class="footer-box-content-li">
                <div class="footer-box-content-item">
                  <div class="footer-box-content-name">客服帮助</div>
                  <div class="footer-box-content-subitem">
                    <ul>
                      <li class="footer-box-content-subli">
                        <a class="“footer-box-content-item-link”" href="https://opensupport.alipay.com/support/home.htm"
                           rel="noopener noreferrer"
                           seed="SEED_FOOTER_INFO_ITEM_LINK_1"
                           target="_blank">技术支持中心</a>
                      </li>
                      <li class="footer-box-content-subli">
                        <a class="“footer-box-content-item-link”"
                           href="https://cschannel.alipay.com/newPortal.htm?scene=mysjbzzx" rel="noopener noreferrer"
                           seed="SEED_FOOTER_INFO_ITEM_LINK_2"
                           target="_blank">在线问答</a>
                      </li>
                      <li class="footer-box-content-subli">
                        <span>客服：0571-88158090</span>
                      </li>
                      <li class="footer-box-content-subli">
                        <span>（9:00-22:00）</span>
                      </li>
                    </ul>
                  </div>
                </div>
              </li>
              <li class="footer-box-content-li">
                <div class="footer-box-content-item">
                  <div class="footer-box-content-name">合作洽谈</div>
                  <div class="footer-box-content-subitem">
                    <ul>
                      <li class="footer-box-content-subli">
                        <a href="https://docs.open.alipay.com/300/106148/" target="_blank">点此联系我</a>
                      </li>
                    </ul>
                  </div>
                </div>
              </li>
            </ul>
          </div>
          <div class="footer-box-right">
            <div class="footer-box-right-title">关注我们</div>
            <div class="footer-box-right-item footer-box-right-item-opacity">关注开放平台生活号</div>
            <div class="footer-box-right-item">
              <img seed="footerBoxRightItem-zosRmsportalHNblwDvJYEuHnbIvlhVy"
                   smartracker="on" src="/resources/10.16.72.32/apicss/image/alipay.png">
            </div>
            <div class="footer-box-right-item footer-box-right-item-opacity">打开支付宝扫一扫</div>
          </div>
        </div>
        <div class="site-footer complete">
          <ul class="site-footer-links">
          </ul>
          <div class="copyright">
            Copyright @ 2016 杭州恒生云融网络科技有限公司 ｜ 浙ICP备15011632号-1
            <div class="server" id="ServerNum"> openhome-60-15 &nbsp; 0ad69a15149690899321860616522_0</div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <#include "/common/jslib.html">
  <script type="text/javascript">
      $(function () {
          ApiFacadeDocManager = {
              init: function () {
                  ApiFacadeDocManager.initApi();
              },
              initApi: function () {
                  var timestamp = Date.parse(new Date());
                  var url = "/api_doc/init_data?timestamp=" + timestamp;
                  var data = {};
                  Jmts.ajaxPost(url, data, function (result) {
                      if (result.success) {
                          var projectList = result.resultData.projectList;//项目列表
                          var apiDocList = result.resultData.apiDocList; //接口列表
                          var projectInfo = result.resultData.projectInfo;
                          var projectSb = new StringBuilder("");
                          var docSb = new StringBuilder("");
                          if (projectList.length > 0) {
                              for (var i = 0; i < projectList.length; i++) {
                                  projectSb.append("<li class='menu-item'>");
                                  if (i == 0) {
                                      projectSb.append("<a href='javascript:void(0)' onclick=\"ApiFacadeDocManager.loadApi('" + projectList[i].project_code + "')\" class='active' id='api_project_" + projectList[i].project_code + "'>" + projectList[i].project_code + "(" + projectList[i].project_name + ")</a>");
                                  } else {
                                      projectSb.append("<a href='javascript:void(0)' onclick=\"ApiFacadeDocManager.loadApi('" + projectList[i].project_code + "')\" id='api_project_" + projectList[i].project_code + "'>" + projectList[i].project_code + "(" + projectList[i].project_name + ")</a>");
                                  }
                                  projectSb.append("</li>");
                              }
                          }
                          /* if(apiDocList.length>0){
                            for(var i=0;i<apiDocList.length;i++){
                              projectSb.append("<li class='menu-item'>");
                              if(i==0){
                                projectSb.append("<a href='javascript:void(0)' onclick=\"ApiFacadeDocManager.loadApi('" + apiDocList[i].docCode+"')\" class='active' id='api_doc_"+apiDocList[i].docCode+"'>" + apiDocList[i].docCode + "(" + apiDocList[i].docName + ")</a>");
                              }else{
                                projectSb.append("<a href='javascript:void(0)' onclick=\"ApiFacadeDocManager.loadApi('" + apiDocList[i].docCode+"')\" id='api_doc_"+apiDocList[i].docCode+"'>" + apiDocList[i].docCode + "(" + apiDocList[i].docName + ")</a>");
                              }
                              projectSb.append("</li>");
                            }
                          } */
                          if (apiDocList.length > 0) {
                              for (var i = 0; i < apiDocList.length; i++) {
                                  docSb.append("<tr>");
                                  docSb.append("<td><a href='/api_doc/doc_detail/" + apiDocList[i].docId + "' target='_blank'>" + apiDocList[i].moduleCode + "#" + apiDocList[i].docCode + "</a></td>");
                                  docSb.append("<td>" + apiDocList[i].docName + "</td>");
                                  docSb.append("<td><a href='javascript:void(0);' onclick='ApiFacadeDocManager.preView(" + apiDocList[i].docId + ")'>预览</a>  ");
                                  docSb.append("<a href='javascript:void(0);' onclick='ApiFacadeDocManager.showDetail(" + apiDocList[i].docId + ")'>详情</a>  ");
                                  docSb.append("<a href='javascript:void(0);' onclick='ApiFacadeDocManager.downloadDoc(" + apiDocList[i].docId + ")'>下载文档</a></td>");
                                  docSb.append("</tr>");
                              }
                          }
                          $("#menuList").html(projectSb.toString());
                          $("#apiList").html(docSb.toString());
                          $("#projectInfo").html(projectInfo.project_code + "(" + projectInfo.project_name + ")");
                      }
                  });
              },
              search: function () {
                  var requestData = $("#requestData").val();
                  if (Jmts.isEmpty(requestData)) {
                      Jmts.warnTips("请输入查询条件");
                      return false;
                  }
                  var url = "/api_doc/search_result";
                  var data = {
                      requestData: requestData
                  }
                  Jmts.ajaxPost(url, data, function (result) {
                      if (result.success) {
                          var apiDocList = result.resultData.apiDocList;
                          var jsonSb = new StringBuilder("");
                          var docSb = new StringBudiler("");
                          var j = 0;
                          for (var i in apiDocList) {
                              var methodList = apiDocList[i].methodList;
                              if (j % 2 == 0) {
                                  jsonSb.append("<tr role='row' class='odd'>");
                              } else {
                                  jsonSb.append("<tr role='row' class='even'>")
                              }
                              jsonSb.append("<td align='left'>" + apiDocList[i].projectCode + "</td>");
                              jsonSb.append("<td align='left'>" + apiDocList[i].projectName + "</td>");
                              jsonSb.append("<td align='left'>" + apiDocList[i].moduleCode + "</td>");
                              jsonSb.append("<td align='left'>" + apiDocList[i].moduleName + "</td>");
                              jsonSb.append("<td align='left'>" + apiDocList[i].apiFacadeCode + "</td>");
                              jsonSb.append("<td align='left'>" + apiDocList[i].apiFacadeName + "</td>");
                              jsonSb.append("<td><a href='javascript:void(0);' onclick='ApiFacadeDocManager.preView(" + apiDocList[i].id + ")'>预览</a>  ");
                              jsonSb.append("<a href='javascript:void(0);' onclick='ApiFacadeDocManager.showDetail(" + apiDocList[i].id + ")'>详情</a>  ");
                              jsonSb.append("<a href='javascript:void(0);' onclick='ApiFacadeDocManager.downloadDoc(" + apiDocList[i].id + ")'>下载文档</a></td>");
                              jsonSb.append("</tr>");

                              //加载左侧doc列表
                              docSb.append("<li class='list-group-item'><a href='javascript:void(0)'>" + apiDocList[i].apiFacadeName + "</a></li>");
                              j++;
                          }
                          $("#dataTables_info").html(jsonSb.toString());
                          $("#methodList").html(docSb.toString());
                      } else {
                          Jmts.warnTips(result.msg);
                      }
                  });
              },
              loadApi: function (projectCode) {
                  $("#menuList li a").removeClass("active");
                  $("#api_project_" + projectCode).addClass("active");
                  var url = "/api_doc/load_data/" + projectCode;
                  var data = {projectCode: projectCode};
                  Jmts.ajaxPost(url, data, function (result) {
                      if (result.success) {
                          var apiDocList = result.resultData.apiDocList;
                          var docSb = new StringBuilder("");
                          if (apiDocList.length > 0) {
                              for (var i = 0; i < apiDocList.length; i++) {
                                  docSb.append("<tr>");
                                  docSb.append("<td><a href='/api_doc/doc_detail/" + apiDocList[i].docId + "' target='_blank'>" + apiDocList[i].moduleCode + "#" + apiDocList[i].docCode + "</a></td>");
                                  docSb.append("<td>" + apiDocList[i].docName + "</td>");
                                  docSb.append("<td><a href='javascript:void(0);' onclick='ApiFacadeDocManager.preView(" + apiDocList[i].docId + ")'>预览</a>  ");
                                  docSb.append("<a href='javascript:void(0);' onclick='ApiFacadeDocManager.showDetail(" + apiDocList[i].docId + ")'>详情</a>  ");
                                  docSb.append("<a href='javascript:void(0);' onclick='ApiFacadeDocManager.downloadDoc(" + apiDocList[i].docId + ")'>下载文档</a></td>");
                                  docSb.append("</tr>");
                              }
                          }
                          $("#apiList").html(docSb.toString());
                      }
                  });
              },
              preView: function (docId) {
                  var url = "/api_doc/doc_view/" + docId;
                  window.open(url);
                  //Jmts.openDialog("viewDoc",url,"预览接口文档",580,1210,66);
              },
              showDetail: function (docId) {
                  var url = "/api_doc/doc_detail/" + docId;
                  window.open(url);
              },
              downloadDoc: function (docId) {
                  var url = "/api_doc/download_doc?docId=" + docId;
                  window.location.href = url;
              }
          }
          ApiFacadeDocManager.init();
      });
  </script>
  <script type="text/javascript">
      document.onkeydown = keyDownSearch;

      function keyDownSearch(e) {
          // 兼容FF和IE和Opera
          var theEvent = e || window.event;
          var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
          if (code == 13) {
              ApiFacadeDocManager.search();//具体处理函数
              return false;
          }
          return true;
      }
  </script>
</body>
</html>
